<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>巧恩登录</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link href="__PUBLIC__/css/layui.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/admin.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/public.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/login.css" rel="stylesheet" type="text/css"/>
</head>
<body>
    <div style="margin:auto;position: relative;">
        <div class="login-logo"><img src="__PUBLIC__/images/logo13.png" alt=""></div>
        <div class="login-right">
            <div class="login-title" style="margin-left: 32px;margin-bottom: 30px;"><img src="__PUBLIC__/images/title.png" alt=""></div>
            <div class="login-box">
                <div class="login-box-title"><img src="__PUBLIC__/images/box-title.png" alt=""></div>
                <div class="input-box-style" style="position: absolute;top: 193px;left: 60px;">
                    <div class="input-box"><input type="text" id="username" placeholder="请输入用户名"><img src="__PUBLIC__/images/fewa.png" alt=""></div>
                    <div class="input-box"><input type="password" id="userpass" placeholder="请输入密码"><img src="__PUBLIC__/images/ewafe.png" alt=""></div>
                    <div class="btn"><a href="javascript:login();">登录</a></div>            
                </div>
            </div>
        </div>
    </div>
		 <script src="__PUBLIC__/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script>
		//js验证码提交的方法 验证通过提交给服务器端
		function login() {
			var name = $('#username').val();
			var pwd = $('#userpass').val();
			if($.trim(name) == '') {
				alert('请填写登录账号');
				return false;
			}
			if($.trim(pwd) == '') {
				alert('请填写登录密码');
				return false;
			}
			$.post("{:U('User/login')}",{name:name,pwd:pwd},function(data){
				if(data == 1){
					window.location.href="/";
				}else if(data==-1){
					alert('该用户已暂停使用!');
					return false;
				}else{
					alert('账号或者密码错误!');
					return false;
				}
			})
		}
		</script>
</body>
</html>